//
//  ReviewCell.m
//  OrderSeat
//
//  Created by haiming on 13-10-9.
//  Copyright (c) 2013年 wangwei. All rights reserved.
//

#import "ReviewCell.h"


#define kRNAME      1001
#define kALL        1002
#define kSERVE      1003
#define kTEST       1004
#define kENVIRONMENT 1005
#define kPRICE      1006
#define kCONTENT    1007
#define kTIME       1008

@implementation ReviewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

-(void)setViewBorder
{
    [_view drawBorder];
}

- (void)setContent:(NSDictionary *)dic
{
    NSString *serve = [dic objectForKey:@"fuwu"];
    NSString *rName = [dic objectForKey:@"dname"];
    NSString *all = [dic objectForKey:@"pingfen"];
    NSString *time = [dic objectForKey:@"add_time"];
    NSString *price = [dic objectForKey:@"xiaofei"];
    NSString *content = [dic objectForKey:@"pingyu"];
    NSString *environment = [dic objectForKey:@"huanjing"];

    UILabel *allLabel = (UILabel *)[self.contentView viewWithTag:kALL];
    UILabel *timeLabel = (UILabel *)[self.contentView viewWithTag:kTIME];
    UILabel *rNameLabel = (UILabel *)[self.contentView viewWithTag:kRNAME];
    UILabel *serveLabel = (UILabel *)[self.contentView viewWithTag:kSERVE];
    UILabel *priceLabel = (UILabel *)[self.contentView viewWithTag:kPRICE];
    UILabel *contentLabel = (UILabel *)[self.contentView viewWithTag:kCONTENT];
    UILabel *environmentLabel = (UILabel *)[self.contentView viewWithTag:kENVIRONMENT];

    allLabel.text = all;
    timeLabel.text = time;
    rNameLabel.text = rName;
    serveLabel.text = serve;
    priceLabel.text = price;
    contentLabel.text = content;
    environmentLabel.text = environment;
    
    [_view drawBorder];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


@end
